<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var age = 20;
        var name = 'iwen';
        var flag = true;
        var user = {};
        //typeof:判断数据类型（判断基本数据类型使用）
        console.log(typeof age);//number
        console.log(typeof name);//string
        console.log(typeof flag);//boolean
        console.log(typeof user);//object(可以反回object的有很多情况)

        console.log(typeof []); //object

        console.log(typeof null);//object
        console.log(typeof undefined);//undefined
        //null 一般代表对象为“没有”
        //undefined一般代表数值为“没有”

        

    </script>
</body>
</html>